﻿@model BookShop3Tables.Models.Book

@{
    ViewBag.Title = "Details";
}

<h2>Details</h2>

<fieldset>
    <legend>Book</legend>

    <div class="display-label">Category</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Category.Name)
    </div>

    <div class="display-label">Author</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Author.FullName)
    </div>

    <div class="display-label">Title</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Name)
    </div>

    <div class="display-label">Saga</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Saga)
    </div>

    <div class="display-label">ReleaseDate</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.ReleaseDate)
    </div>

    <div class="display-label">Price</div>
    <div class="display-field">
        @*@Html.DisplayFor(model => model.Price)*@
        @String.Format("{0:F}", Model.Price)
    </div>

</fieldset>
<p>
    @Html.ActionLink("Add to cart", "AddToCart", "ShoppingCart", new { id = Model.BookID }, "")
    @Html.ActionLink("Edit", "Edit", new { id=Model.BookID }) |
    @Html.ActionLink("Back to List", "Index")
</p>
